home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1998 April / EnigmA AMIGA RUN 26 (1998)(G.R. Edizioni)(IT)[!][issue 1998-04].iso / earcd / giochi / adoom / amiga_notes.txt < prev    next >
Text File  |  1998-03-15  |  36KB  |  744 lines

  1. ========================================================================
  2. v1.2 12 Mar 98
  3. ------------------------------------------------------------------------
  4. Fixed bug in DrawPatchIndirectFlipped() in v_video.c that caused crash
  5. in DOOM2 Finale.
  6.  
  7. ------------------------------------------------------------------------
  8. Applied bug patches from Cyril Deble for rotatemap and maponhu.  Use
  9. 'z' to cycle through map types.
  10.  
  11. ------------------------------------------------------------------------
  12. DIRECTCGX and DEH weren't recognised as tooltypes.  Fixed in
  13. amiga_main.c.
  14.  
  15. ------------------------------------------------------------------------
  16. Added support for Graffiti gfx adaptor in amiga_video.c and
  17. amiga_main.c using graffiti.library.  New options -graffiti (for
  18. 320x256) and -graffiti2 (for 640x256, AGA only).  I can't test these
  19. options properly because I don't have a Graffiti board.
  20.  
  21. ------------------------------------------------------------------------
  22. Made bug-fix to R_DrawPlanes() in amiga_draw.s as suggested by Arto
  23. Huusko.  Fixes glitch with first sky column.
  24.  
  25. ------------------------------------------------------------------------
  26. Attempted to implement Graffiti support using graffiti.library in
  27. amiga_video.c and v_video.c.  New options -graffiti (320x256) and
  28. -graffiti2 (640x256, AGA only).  I'm told, however, that it doesn't
  29. work, perhaps because of the Window that is opened for IDCMP input.
  30.  
  31. ------------------------------------------------------------------------
  32. Explicitly set topaz8 font.  The -fps option may have crashed before
  33. if a larger font was used and text overflowed the bitmap.
  34.  
  35. ------------------------------------------------------------------------
  36. Translate keys '<' to ',' and '>' to '.' so SHIFT and strafe work at
  37. the same time.  Numeric keys '1'..'9' and '0' are translated directly
  38. from the raw keycode instead of using MapRawKey() so you don't need
  39. SHIFT to change weapons on French keyboards.  The DEL key is now the
  40. same as F11 (change gamma) instead of KEY_BACKSPACE.
  41.  
  42. ------------------------------------------------------------------------
  43. Changed "if (french)" to "if (language==french)" in several places in
  44. wi_stuff.c and hu_stuff.c because french is always 1.  This appears to
  45. have fixed problems with cooperative network play beyond level 1 and
  46. also keymap translation for messages in network play.
  47.  
  48. ------------------------------------------------------------------------
  49. Fixed bug in st_stuff.c that caused IDCLEVnn cheat to fail with
  50. commercial WADs.  (Variable epsd was set to 0 instead of 1.)
  51.  
  52. ------------------------------------------------------------------------
  53. Split amiga_draw.s into several files: amiga_draw.s; amiga_things.s;
  54. amiga_segs.s; amiga_data.s; amiga_sight.s; amiga_plane.s.
  55.  
  56. ------------------------------------------------------------------------
  57. Applied patches supplied by Arto Huusko to several amiga_*.s routines.
  58. Added some more assembly routines from Arto too.
  59.  
  60. ------------------------------------------------------------------------
  61. Changed smakefile to assemble *.s files with PhxAss v4.37 instead of
  62. with Macro68 and asm.  Made minor changes to several *.s files so they
  63. assembled with PhxAss, e.g, QUAD directive -> CNOP 0,4.
  64.  
  65. ------------------------------------------------------------------------
  66. Added -rawkey option in amiga_video.c for translating keys the old way
  67. with a static table.
  68.  
  69. ------------------------------------------------------------------------
  70. Replaced amiga_sound.c with version from Joe Fenton which LoadSeg()s a
  71. separate ADoom_SndSrvr module for music and sound effects.  This
  72. module does proper stereo panning with sound effects and can play up
  73. to 16 sounds at once.  The file amiga_music.c is no longer used.
  74.  
  75. ========================================================================
  76. v1.1 20 Feb 98
  77. ------------------------------------------------------------------------
  78. Restored MAXVISSPRITES, MAXDRAWSEGS and MAXVISPLANES to their original
  79. values.  They took up too much memory and often caused structures to be
  80. allocated in chipmem, slowing the game down.
  81.  
  82. ------------------------------------------------------------------------
  83. Explicitly declare KeymapBase in amiga_video.c and explicitly open and
  84. close keymap.library.  Otherwise SAS/C tries to open v38 of
  85. keymap.library (because __oslibversion == 38 in amiga_main.c) and this
  86. fails in OS3.0 which comes with only v37 of keymap.library.
  87.  
  88. ------------------------------------------------------------------------
  89. Increased MAXSPECIALCROSS in p_enemy.c from 8 to 20 to match p_map.c.
  90. (With the original value of 8, array indices go out of bounds in
  91. p_map.c.)
  92.  
  93. ========================================================================
  94. v1.0 19 Feb 98
  95. ------------------------------------------------------------------------
  96. Changed amiga_video.c to pre-calculate amiga colourtables for all
  97. possible palettes for a given gamma level.  Added new routine
  98. I_RecalcPalettes().  Added another argument to I_SetPalette().  Change
  99. all places where I_SetPalette() is called and also where usegamma is
  100. modified.  Fixed bug with colour 0.
  101.  
  102. ------------------------------------------------------------------------
  103. Added support for different display resolutions.  Added -width and
  104. -height options in v_video.c.  SCREENWIDTH and SCREENHEIGHT are now
  105. variables.  All static arrays with size dependent on SCREENWIDTH and
  106. SCREENHEIGHT are now dynamically allocated.  In particular,
  107. openings[], floorclip[], ceilingclip[], spanstart[], spanstop[],
  108. yslope[], distscale[], cachedheight[], cacheddistance[],
  109. cachedxstep[], cachedystep[], xtoviewangle[], negonearray[],
  110. screenheightarray[], ylookup[], ylookup2[], columnofs[] and
  111. FUZZOFFSET[] are now pointers instead of arrays.  Dynamically
  112. initialise FUZZOFFSET[] table.  Also the top[] and bottom[] arrays in
  113. visplane_t are now pointers to shorts instead of arrays of bytes.  Row
  114. index no longer fits in a byte.  Changed many lea instructions in
  115. amiga_draw.s to movea.l instructions to handle pointers instead of
  116. arrays.
  117.  
  118. Many occurrances of SCREENWIDTH and SCREENHEIGHT changed to 320 and
  119. 200 respectively because they refer to, e.g, fixed data read from
  120. file.  On the other hand, many constants changed to formulas involving
  121. SCREENWIDTH and SCREENHEIGHT because they deal with display offsets.
  122.  
  123. Added V_DrawPatchInDirect() and V_DrawPatchInDirectFlipped() functions
  124. to v_video.c which stretch a patch while rendering to display.  Used
  125. these for stretching init/help/finale screens and for stretching icons
  126. and text.
  127.  
  128. Modified R_DrawViewBorder() in r_draw.c to draw border around sides of
  129. status bar.
  130.  
  131. Many of the ideas and code snippets for high resolution modes came
  132. from v0.47 of DOSDOOM, a DOS port of LinuxDOOM by Chi Hoang
  133. (cyhoang@acs.ucalgary.ca).
  134.  
  135. Modified C2P routines to handle large displays.  Chip buffers are now
  136. dynamically allocated in amiga_video.c.  Very long blits are split
  137. into smaller blits that the blitter can cope with.
  138.  
  139. Changed the vertical scale for rendering the sky so it doesn't "wrap
  140. around" in high resolution modes.  New variable: pspriteiscale2.
  141.  
  142. ------------------------------------------------------------------------
  143. Added dehacked.c from Cyril Deble <Cyril.Deble@inforoute.cgs.fr> for
  144. parsing .DEH format patch files.  Called from d_main.c.
  145.  
  146. ------------------------------------------------------------------------
  147. Rewrote keyboard handling routine.  Now call keymap.library
  148. MapRawKey() for raw keycodes < 0x40.  Translate numeric keypad keys to
  149. different codes.
  150.  
  151. ------------------------------------------------------------------------
  152. Call cybergraphics.library BestCModeIDTags() to find best mode (if
  153. cybergraphics.library was successfully opened).
  154.  
  155. ------------------------------------------------------------------------
  156. Added I_MarkRect() to amiga_video.c to record dirtybox.  Every
  157. rendering function that used to call V_MarkRect() now calls
  158. I_MarkRect() to record the rectangle that was dirtied.  The main 3D
  159. viewwindow is the only thing not so marked.  I_FinishUpdate() uses
  160. this information to minimise the amount of copying with WPA8() or
  161. C2P().  (Unfortunately most C2P routines still convert the entire
  162. display because they don't handle offset and modulo.)
  163.  
  164. ------------------------------------------------------------------------
  165. Had another go at getting -directcgx working properly with
  166. double-buffering.  Double-buffering uses a double-height Screen and
  167. ScrollVPort(), not ChangeScreenBuffer().  Not everyone has the latest
  168. version of CyberGraphX which supports ChangeScreenBuffer() yet.
  169.  
  170. The main problem I had before is that I forgot to recalculate the
  171. ylookup[] and ylookup2[] arrays of screen addresses whenever the
  172. buffer flipped.  So ADoom always rendered the 3D view into the same
  173. buffer.
  174.  
  175. At the end of each frame with -directcgx, the dirtybox is copied to
  176. the other buffer with ClipBlit().  That's because text, icons, status
  177. bar, etc, must be rendered into both buffers.  The 3D viewwindow is
  178. not copied unless it falls within the dirtybox.  Hopefully ClipBlit()
  179. uses the gfx-card's blitter because both the src and dest are in the
  180. CyberGraphX Window.
  181.  
  182. I'm still stymied at being unable to read displayed information back
  183. from a CyberGraphX Window, as is done by the wipe routine at the start
  184. of each level (I_ReadScreen()).  ReadPixelArray8() from the hidden
  185. part of a CyberGraphX Window seems to return junk.  Is this a bug in
  186. cybergraphics.library?  LockBitMapTags() followed by memcpy() from the
  187. framebuffer also seems to return junk.  Is the GVP Spectrum 28/24
  188. framebuffer write-only?
  189.  
  190. ------------------------------------------------------------------------
  191. Added several hand-optimised assembly replacements for various C
  192. routines to amiga_draw.s as emailed to me by Arto Huusko
  193. <arto.huusko@pp.qnet.fi>.  This resulted in a significant overrall
  194. speed improvement.  Modified his routines for variable display
  195. resolution.
  196.  
  197. ------------------------------------------------------------------------
  198. Increased some constants to allow much more complex WADs to be
  199. handled, e.g, MAXVISSPRITES: 128->1024, MAXDRAWSEGS: 256->1024,
  200. MAXVISPLANES: 128->1024.  Hopefully that didn't increase memory
  201. requirements too much.
  202.  
  203. ========================================================================
  204. v0.9  7 Feb 98
  205. ------------------------------------------------------------------------
  206. Patched wi_stuff.c and st_lib.c to work if WIMINUS and STTMINUS lumps
  207. are missing from WAD file.  Those lumps are missing from some early
  208. registered doom wads.
  209.  
  210. ------------------------------------------------------------------------
  211. Added -rtg, -native and -ehb options in amiga_video.c in case
  212. autodetection fails.
  213.  
  214. ------------------------------------------------------------------------
  215. Increased priority of double-buffering subtask in amiga_video.c from 5
  216. to 100.
  217.  
  218. ------------------------------------------------------------------------
  219. Added call to chkabort() in P_LookForPlayers() in p_enemy.c so it's
  220. possible to break out of loop when try to play incompatible demo in
  221. registered doom.wad v1.10 with -forcedemo.
  222.  
  223. ------------------------------------------------------------------------
  224. Added code for raw network protocol over NULL-modem serial cable in
  225. amiga_net.c
  226.  
  227. ------------------------------------------------------------------------
  228. Made some optimisations to amiga_fixed.s as suggested by Gerald
  229. Schnabel <Gerri@studbox.uni-stuttgart.de>.
  230.  
  231. ------------------------------------------------------------------------
  232. Applied patches to am_map.c supplied by Cyril Deble to fix bugs with
  233. -rotatemap and -maponhu.
  234.  
  235. ------------------------------------------------------------------------
  236. Changed LONG() and SHORT() macros to SWAPLONG() and SWAPSHORT()
  237. respectively throughout all *.c and m_swap.h files to avoid conflict
  238. with Amiga includes.
  239.  
  240. ------------------------------------------------------------------------
  241. Added -cpu <cpu>, -rtg, -native and -ehb options and corresponding
  242. tooltypes for overriding default autodetection.
  243.  
  244. ------------------------------------------------------------------------
  245. W_AddFile() and W_Reload() in w_wad.c were free()ing memory using a
  246. fileinfo pointer that had been incremented after the fileinfo was
  247. malloc()ed.  Thanks to Frank Wille and Joe Fenton for spotting this.
  248. Fixed.  Also applied patches to amiga_median.c and amiga_video.c
  249. supplied by Frank Wille.
  250.  
  251. ------------------------------------------------------------------------
  252. Moved FPS counter from top-left corner of display to top right in
  253. amiga_video.s.
  254.  
  255. ------------------------------------------------------------------------
  256. Added SEGA controller code from Joe Fenton.  Changes to amiga_video.c
  257. and amiga_main.c.  New file amiga_sega.s.
  258.  
  259. ------------------------------------------------------------------------
  260. Renamed mmu.* to amiga_mmu.*.  Include amiga_mmu.i in source
  261. distribution.  (Was accidently left out before.)  Renamed macros.h to
  262. amiga_macros.h.
  263.  
  264. ------------------------------------------------------------------------
  265. Applied patches to I_SetPalette() in amiga_video.c as supplied by
  266. Jeroen T. Vermeulen <jtv@xs4all.nl>.
  267.  
  268. ------------------------------------------------------------------------
  269. Added ylookup2[] table to d_draw.c and used it to speed up column and
  270. span rendering routines in amiga_draw.s slightly.  Thanks to Danny
  271. Robinson <dannyr@pangea.ca> for suggesting this.
  272.  
  273. ------------------------------------------------------------------------
  274. Added IPX protocol support to amiga_net.c to use G.J. Peltenburg's
  275. amipx.library.  Made changes to d_net.c for calculating PC-compatible
  276. packet checksums.  Added -forceversion and -pcchecksum options.
  277.  
  278. ========================================================================
  279. v0.8 22 Jan 98
  280. ------------------------------------------------------------------------
  281. Changed amiga_video.c to use timer.device and ReadEClock() for timing
  282. instead of SAS/C timer() function.  Resorted to floating-point
  283. arithmetic for converting eclocks to microseconds at the end, so now
  284. compile with MATH=IEEE.
  285.  
  286. ------------------------------------------------------------------------
  287. Lowered volume of music in amiga_music.s, got rid of clicks.  Also
  288. lowered volume of sound effects in amiga_sound.c.  Only the lower half
  289. of the volume control was being used before.
  290.  
  291. ------------------------------------------------------------------------
  292. Now compile with OPTSCHEDULE sc option.
  293.  
  294. ------------------------------------------------------------------------
  295. Added code to amiga_video.c for -fps option for displaying frames per
  296. second in top-left corner.
  297.  
  298. ------------------------------------------------------------------------
  299. For 68040/68060 + AGA, now use comparison buffer C2P routine if window
  300. is smaller than SCREENSIZE-64, else use non-comparison buffer C2P.
  301.  
  302. ------------------------------------------------------------------------
  303. Disabled "S_StartSoundAtVolume: 16bit and not pre-cached - wtf?" msg
  304. in s_sound.c with -nosfx.
  305.  
  306. ------------------------------------------------------------------------
  307. Added -heapsize option in amiga_system.c for specifying zone size in
  308. kilobytes.
  309.  
  310. ------------------------------------------------------------------------
  311. Rewrote R_RenderSegLoop() (in r_segs.c) in assembly language (to
  312. amiga_draw.s) and hand-optimised it a bit.
  313.  
  314. ------------------------------------------------------------------------
  315. Fixed (harmless) missing #endif in d_main.c.
  316.  
  317. ------------------------------------------------------------------------
  318. There appears to be a bug in r_things.c.  The code:
  319.  
  320.     check = namelist;
  321.     while (*check != NULL)
  322.     check++;
  323.  
  324. scans for a NULL which doesn't exist on the end of the namelist array
  325. (unless you're lucky --- it's just whatever comes after the array in
  326. memory).  Fixed by making the sprnames[] array 1 element longer in
  327. info.c and info.h and initialising the last element to NULL.  I wonder
  328. if this fixed the "PNAMES not found" bug.
  329.  
  330. ------------------------------------------------------------------------
  331. Compiled everything with DATA=NEAR.  This involved finding the dozen
  332. or so largest data structures throughout all files and declaring them
  333. with FAR, so the remainder fitted within 64kb.  Added the following
  334. lines to doomdef.h:
  335.  
  336.     #ifdef __SASC
  337.     #define FAR __far
  338.     #else
  339.     #define FAR
  340.     #endif
  341.  
  342. Added #include "doomdef.h" to several files to get the FAR definition.
  343.  
  344. ------------------------------------------------------------------------
  345. Applied patch supplied by Aki to DrawColumn_060() in amiga_draw.s to
  346. fix problem with red stairs and random pixels on 68060.
  347.  
  348. ------------------------------------------------------------------------
  349. Changed most routines in amiga_draw.s to use near A4-relative
  350. addressing of variables.  Couldn't figure out how to do this with
  351. Macro68 (because DT base for A4 is external) so used SAS/C asm
  352. instead.  Had to convert back to old syntax and manually optimise
  353. branches.
  354.  
  355. ------------------------------------------------------------------------
  356. Applied patches supplied by Cyril Deble to d_main.c and am_map.c for
  357. new -rotatemap and -maponhu options.
  358.  
  359. ========================================================================
  360. v0.7 16 Jan 98
  361. ------------------------------------------------------------------------
  362. Version 0.6 had a serious bug in c2p8_040_amlaukka.s which caused
  363. crashes on 68040+AGA and 68060+AGA machines.  Fixed with patch
  364. supplied by Aki Laukkanen.
  365.  
  366. ------------------------------------------------------------------------
  367. Version 0.6 had a serious bug in the use_mmu cleanup code which caused
  368. crashes one exit when -mmu or MMU was used.  Fixed with patch supplied
  369. by Aki Laukkanen.
  370.  
  371. ------------------------------------------------------------------------
  372. Commenting out the Macro68 debug statements in the *.s files made the
  373. executable much smaller.
  374.  
  375. ------------------------------------------------------------------------
  376. The TURBO tooltype (whatever it is) isn't a flag, it takes an
  377. argument.  Fixed this in amiga_main.c.  Thanks to Thomas Aglassinger
  378. <agi@rieska.oulu.fi> for spotting this bug.
  379.  
  380. ========================================================================
  381. v0.6 15 Jan 98
  382. ------------------------------------------------------------------------
  383. Applied patches to amiga_music.s as supplied by Joe Fenton.
  384. Also added code to set correct frequency for PAL or NTSC instead of
  385. assuming NTSC.
  386.  
  387. ------------------------------------------------------------------------
  388. Applied patches to column and span drawing routines in amiga_draw.s as
  389. supplied by Aki Laukkanen.  This fixed all the bright dots scattered
  390. around floors and ceilings, and the red stairs at the start.  Disabled
  391. various routines in r_draw.c, r_segs.c and r_things.c that are
  392. replaced by routines in amiga_draw.s.
  393.  
  394. ------------------------------------------------------------------------
  395. Now use FPU for FixedMul() on 68060.  Joe Fenton says "2 FP multiplies
  396. beat the hell out of 4 word multiplies, plus the associated adds and
  397. swaps".  Added SetFPMode() routine to amiga_fixed.s to set FPU
  398. rounding mode to "round towards minus infinity".  Otherwise WAD demos
  399. got out of step and went wrong when using FPU for multiply.
  400.  
  401. ------------------------------------------------------------------------
  402. In p_map.c, undid the patch I made in version 0.0 by changing line:
  403.  
  404.     if (ld->special && numspechit < MAXSPECIALCROSS)
  405.  
  406. back to:
  407.  
  408.     if (ld->special)
  409.  
  410. Instead added code in p_map.c and p_enemy.c to check bounds of all
  411. spechit[] array accesses.  With MAXSPECIALCROSS == 8, got lots of
  412. array out of bounds accesses, especially in 2nd level of DOOM II.
  413. Changed MAXSPECIALCROSS from 8 to 20.  That got rid of them.
  414.  
  415. ------------------------------------------------------------------------
  416. After several hours of stepping through with CPR, finally found and
  417. fixed the bug that made the Doom II "Dead Simple" level impossible to
  418. complete.  For the function pointer comparison in the line:
  419.  
  420.     if (th->function.acp1 != (actionf_p1)P_MobjThinker)
  421.  
  422. in p_enemy.c, SAS/C generated code which compared acp1 with the
  423. address of the ALV (JMP instruction) for P_MobjThinker() instead of
  424. the address of the P_MobjThinker() function itself.  Thus the test
  425. always failed, even when the function pointers were the same.  Fixed
  426. by compiling everything with ABSFUNCPOINTER.
  427.  
  428. I reported this to Steve Krueger at SAS.  He replied:
  429.  
  430. "It's not a bug, but rather a limitation of the CODE=NEAR model. We
  431. even document this in the manual, and provide an option to work around
  432. it if you still want to use CODE=NEAR. Check the manual for
  433. information on the ABSFUNCTIONPOINTER option.
  434.  
  435. ------------------------------------------------------------------------
  436. Found and fixed the crash on exit bug when music is enabled.  Register
  437. a0 wasn't initialised to _custom in FreeChannels() in amiga_music.s.
  438.  
  439. ------------------------------------------------------------------------
  440. Added -nosfx option and tooltype for disabling sound effects and
  441. leaving audio channels free.
  442.  
  443. ------------------------------------------------------------------------
  444. Added Aki Laukkanen's code to amiga_video.c for marking screens[0] and
  445. the video raster as "imprecise" with the MMU when the -mmu option is
  446. specified.  This should create a slight speedup for 68060.
  447.  
  448. ------------------------------------------------------------------------
  449. Started adding code for -directcgx option for rendering directly to
  450. framebuffer of any video card running CyberGraphX.  Discovered it
  451. flickers badly and needs double or triple-buffering.  Started adding
  452. code for double-buffering, but didn't get logic for interaction with
  453. I_ReadScreen() right.  Still haven't got LockBitMapTags() and
  454. UnLockBitMap() called from the right places, so sometimes tries to
  455. write to framebuffer (screens[0]) while not locked.  This may corrupt
  456. other screens if you flip or drag screens while running with
  457. -directcgx.
  458.  
  459. ------------------------------------------------------------------------
  460. Applied patches from Aki Laukkanen to get low detail mode working.
  461. This included substantial changes to amiga_draw.s and r_draw.c.  The
  462. assembly routines Aki supplied for R_DrawFuzzColumn(),
  463. R_DrawFuzzColumnLow(), R_DrawTranslatedColumn() and
  464. R_DrawTranslatedColumnLow() didn't appear to work right, so reverted
  465. to C versions in r_draw.c.
  466.  
  467. ========================================================================
  468. v0.5  8 Jan 98
  469. ------------------------------------------------------------------------
  470. Added music code in amiga_music.s based on Joseph Fenton .MUS player.
  471. Changed amiga_sound.s to use only 2 channels for sound effects when
  472. music is enabled, and 4 channels when music is disabled.  Added
  473. MIDI_Instruments and MIDI_Instruments.s to archive.  MIDI_Instruments.s
  474. isn't actually used, but it's helpful for understanding the instrument
  475. format.
  476.  
  477. ------------------------------------------------------------------------
  478. Added Aki Laukkanen's latest 68040 and 68060-optimised column and span
  479. renderers in amiga_draw.s.  Modified r_main.c and r_draw.h to handle
  480. different DrawColumn_040(), DrawColumn_060(), DrawSpan_040() and
  481. DrawSpan_060().  Aki sent me some more fast C2P and MMU routines but I
  482. haven't got those working yet.
  483.  
  484. ------------------------------------------------------------------------
  485. The call to BestModeID() in amiga_video.c had an unterminated taglist.
  486. Fixed.
  487.  
  488. ------------------------------------------------------------------------
  489. Added Aki's 68060 versions of FixedMul() and FixedDiv() in amiga_fixed.s.
  490. 68060 FixedDiv uses FPU.  If there is no FPU, fall back to 68040 version.
  491. Added code to select appropriate routines in amiga_main.c.
  492. Changed FixedMul() definitions in m_fixed.h to look like this:
  493. extern fixed_t (*FixedMul)    (fixed_t a, fixed_t b);
  494. extern fixed_t (*FixedDiv)    (fixed_t a, fixed_t b);
  495. fixed_t FixedMul_040    (fixed_t a, fixed_t b);
  496. fixed_t FixedMul_060    (fixed_t a, fixed_t b);
  497. fixed_t FixedDiv_040    (fixed_t a, fixed_t b);
  498. fixed_t FixedDiv_060fpu    (fixed_t a, fixed_t b);
  499. /* fixed_t FixedDiv2    (fixed_t a, fixed_t b); */
  500.  
  501. ------------------------------------------------------------------------
  502. Added code to amiga_video.c to check version numbers before trying to
  503. call BestModeID() and put up a screenmode requester.  Explicitly
  504. declared LowLevelBase so it doesn't try and autoopen lowlevel.library.
  505.  
  506. ------------------------------------------------------------------------
  507. Fixed I_WaitVBL() in amiga_video.c to call WaitTOF().  It's only
  508. called on exit to delay long enough to hear the final sound effect.
  509.  
  510. ========================================================================
  511. v0.4
  512. ------------------------------------------------------------------------
  513. Gamma correction wasn't working in ECS mode.  Fixed in I_Palette()
  514. in amiga_video.c.
  515.  
  516. ------------------------------------------------------------------------
  517. I think I finally found the cause of the 80000003 crash on exit.  It
  518. was caused by 2 missing commas in the initialisation strings for
  519. endmsg[] in dstrings.c following the strings: "go ahead and leave. see
  520. if i care." and "you're lucky i don't smack\nyou for thinking about
  521. leaving.".  Fixed.
  522.  
  523. ------------------------------------------------------------------------
  524. Added 68020/30 optimised C2P routine in c2p_020.s.  Use blitter for
  525. final passes which means double-buffering is required to eliminate
  526. otherwise severe flicker.  Implemented double-buffering for all planar
  527. modes in amiga_video.c.
  528.  
  529. ------------------------------------------------------------------------
  530. Found that the last QBlit() pass finished while the main program was
  531. in the middle of 3D rendering.  This meant the ChangeScreenBuffer()
  532. call was delayed until the end of rendering.  The program felt very
  533. sluggish, even though the frame-rate was higher than before because
  534. there was a much longer delay between pressing a key and seeing the
  535. result happen on the screen.  To solve this I created a new subtask
  536. which simply calls ChangeScreenBuffer() in a loop when signalled from
  537. the QBlit() cleanup function.  This way the main engine is interrupted
  538. to call ChangeScreenBuffer() at the earliest opportunity.  Extensive
  539. changes are in amiga_video.c.
  540.  
  541. ------------------------------------------------------------------------
  542. Gabry (ggreco@iol.it) emailed me some CD32 joypad handling code.  I
  543. included it in amiga_video.c (disabled by default) but I can't test
  544. it.  To enable it, use the -joypad option or JOYPAD tooltype.
  545.  
  546. ------------------------------------------------------------------------
  547. Several people sent me faster replacements for R_DrawColumn() and
  548. R_DrawSpan() in amiga_draw.s, but so far only one of them worked
  549. right.
  550.  
  551. ========================================================================
  552. v0.3
  553. ------------------------------------------------------------------------
  554. Low detail code doesn't work, so disabled detail level toggle in
  555. m_menu.c.  Previously setting low detail and then resizing screen
  556. corrupted graphics.
  557.  
  558. ------------------------------------------------------------------------
  559. Added ClearPointer() call before CloseWindow() in amiga_video.c.
  560. Let's see if that fixes the crash on exit.  Hmm, seems OK after about
  561. a dozen runs.  Perhaps it was a bug in CyberGraphX.  ... nope, just
  562. got another 80000003 crash on exit  :(
  563.  
  564. ------------------------------------------------------------------------
  565. Added code to get ProgramName in amiga_main.c.  Added definition of
  566. ProgramName in m_args.h and m_args.c.
  567.  
  568. ------------------------------------------------------------------------
  569. Allocated space for myargv[] in amiga_main.c and copy argv[] across.
  570. Parse icon tooltypes and convert to additional entries in myargv[]
  571. and myargc.
  572.  
  573. ------------------------------------------------------------------------
  574. Added -screenmode option to set ScreenMode in amiga_video.c
  575.  
  576. ------------------------------------------------------------------------
  577. Added -forcedemo option in g_game.c to force demos to play even if
  578. the version number doesn't match.
  579.  
  580. ------------------------------------------------------------------------
  581. Changed handling of $HOME in d_main.c to append a '/' if it doesn't
  582. already end in a '/' or a ':'.
  583.  
  584. ------------------------------------------------------------------------
  585. Added trailing slashes to definitions of DEVMAPS and DEVDATA in
  586. dstrings.h.
  587. #define DEVMAPS "devmaps/"
  588. #define DEVDATA "devdata/"
  589.  
  590. ========================================================================
  591. v0.2   1 Jan 1998
  592. ------------------------------------------------------------------------
  593. Changed zone management code to allocate between 2Mb and 6Mb instead
  594. of always 6Mb.  ADoom should now work on Amigas with less memory.
  595. Check result of allocation.  Previous version crashed if 6Mb malloc
  596. failed.
  597.  
  598. ------------------------------------------------------------------------
  599. Changed handling of HOME environment variable in d_main.c
  600.  
  601. ------------------------------------------------------------------------
  602. The Amiga doesn't have F11 and F12 keys.  Changed amiga_video.c to map
  603. the '[' and ']' keys to F11 and F12.  Now gamma correction works.
  604. Also fixed keypad '+'.
  605.  
  606. ------------------------------------------------------------------------
  607. Added joystick code using gameport device in amiga_video.c.  Changed
  608. m_misc.c to enable usejoystick.
  609.  
  610. ------------------------------------------------------------------------
  611. Added AmiTCP networking support by writing a new version of
  612. amiga_net.c based on i_net.c for Linux.  Successfully worked to a PC
  613. running Linux with DOOM compiled from the released DOOM sources.
  614. Performance was really bad, with lots of jerking, even on ethernet.
  615. Tried improving performance by making sends non-blocking as well as
  616. recvs.  AmiTCP 4.3 appears to return errno==EINVAL instead of
  617. errno=EWOULDBLOCK for non-blocking recvfrom() and non-blocking
  618. sendto() --- seems pretty weird to me, or have I done something wrong?
  619.  
  620. ========================================================================
  621. v0.1  30 Dec 97
  622. ------------------------------------------------------------------------
  623. Open audio.device on 4 channels and play sound effects in
  624. amiga_sound.c.  Cache up to 12 sound effects in chipmem at a time.
  625. All other sound effects are cached in fastmem.  Audio period is still
  626. not calculated correctly from pitch.  Separation (balance) is ignored,
  627. so 3D sound effects are not right.  Changed s_sound.c to pass channel
  628. number (cnum) to I_StartSound().  Changed m_misc.c to set 4 channels
  629. instead of 3.
  630.  
  631. ------------------------------------------------------------------------
  632. Deleted calls to I_UpdateSound() and I_SubmitSound() in d_main.c
  633.  
  634. ------------------------------------------------------------------------
  635. Stripped 68040-optimised AGA and ECS(EHB) C2P routines out of Flick
  636. v1.5 and linked them into amiga_video.c.  Changed "dirty_list"
  637. mechanism to a comparison buffer instead.  Added amiga_median.c for
  638. calculating best EHB palette and 8-bit -> 6-bit colour xlate table.
  639. Changed EHB C2P routine to handle colour translate table (probably not
  640. entirely efficiently).  These routines are not quite state-of-the-art
  641. (e.g, old merge macro) but they are not bad either.  Linked in 68020-
  642. and Akiko-optimised routines too, but they are not called yet.
  643.  
  644. ------------------------------------------------------------------------
  645. Made a minor optimisation speedup to R_DrawColumn().
  646.  
  647. ========================================================================
  648. v0.0  28 Dec 97
  649. ------------------------------------------------------------------------
  650. Wrote amiga_main.c, amiga_system, amiga_sound.c, amiga_video.c,
  651. amiga_net.c and smakefile to replace i_main.c, i_system, i_sound.c,
  652. i_video.c, i_net.c and Makefile respectively.  The amiga_sound and
  653. amiga_net routines are dummies.
  654.  
  655. ------------------------------------------------------------------------
  656. Amiga is big-endian.  Compiled with DEFINE=__BIG_ENDIAN__.  It looks
  657. like the code hasn't been tested with __BIG_ENDIAN__ for a while.  The
  658. test in m_swap.c for whether swap routines should be included was
  659. around the wrong way.  SwapSHORT() returned an int instead of an
  660. unsigned short.
  661.  
  662. ------------------------------------------------------------------------
  663. Fixed point arithmetic routines in m_fixed.c used (long long) 64-bit
  664. datatype not available in SAS/C.  Replaced with assembly routines in
  665. amiga_fixed.s.  Added check for divide by 0 in FixedDiv() because
  666. Amiga crashes on divide by 0.
  667.  
  668. ------------------------------------------------------------------------
  669. The Unix function alloca() was called from r_data.c, w_wad.c and some
  670. other files.  I replaced with calls to malloc() and added calls to
  671. free() where each routine returns.
  672.  
  673. ------------------------------------------------------------------------
  674. Changed the cache routines in w_wad.c to use the more efficient
  675. fopen(), fread(), fseek(), fclose() instead of open(), read(),
  676. lseek(), close().  Changed handles from (int) to (FILE *) everywhere
  677. including lumpinfo_t structure in w_wad.h.  Fixed the filelength()
  678. function to align stat structure on 4-byte boundary.  Used SAS/C
  679. fileno() function to get file number from (FILE *).
  680.  
  681. ------------------------------------------------------------------------
  682. In d_main.c, changed the handling of slashes and double-dots in
  683. filenames to Amiga conventions.
  684.  
  685. ------------------------------------------------------------------------
  686. Moved definition of RANGECHECK from doomdef.h to smakefile.  Disabled
  687. SNDSERV and SNDINTR in doomdef.h.
  688.  
  689. ------------------------------------------------------------------------
  690. SAS/C 6.58 appeared to generate bad code for the line:
  691.  
  692.     offsetangle = abs(rw_normalangle-rw_angle1);
  693.  
  694. in r_segs.c, resulting in corrupted graphics.  This took me hours to
  695. track down.  Putting printf() instructions before and after, the code
  696. calulated abs(1073741824-1927746431)=1073741824 instead of the correct
  697. answer of 854004607.  As far as I could see, it was using the stdlib.h
  698. definition of abs(), which looks fine.  As a workaround, I changed
  699. abs() to iabs() (SAS/C function) throughout in all sources.
  700.  
  701. On 5 Jan 98, Michael van Elst <mlelstv@serpens.swb.de> offered the
  702. following explanation:
  703.  
  704. >It doesn't. It is an artefact of ANSI C. rw_normalangle is defined
  705. >as unsigned, rw_angle1 is defined as int. The result of the difference
  706. >is therefore unsigned. You need something like:
  707. >
  708. >    offsetangle = abs((int)rw_normalangle - (int)rw_angle1);
  709. >or  offsetangle = abs((long)rw_normalangle - (long)rw_angle1);
  710. >
  711. >and make sure that rw_normalangle fits into the positive int or
  712. >long values.
  713. >[...]
  714. >gcc probably doesn't use the macro but an abs(int) function. You
  715. >get the same with SAS/C if you #undef abs.
  716.  
  717. ------------------------------------------------------------------------
  718. Got READ enforcer hits in p_enemy.c at the line:
  719.  
  720.         ld = spechit[numspechit];
  721.  
  722. Crashed badly shortly afterwards if Enforcer was not running.  As far
  723. as I can tell, the variable numspechit should be in the range 0..7.
  724. Somehow numspechit gets the value 149551680 (0x8e9fa40).  Without
  725. really knowing what I was doing, I attempted to fix the problem by
  726. changing the line:
  727.  
  728.     if (ld->special)
  729.  
  730. in p_map.c to:
  731.  
  732.     if (ld->special && numspechit < MAXSPECIALCROSS)
  733.  
  734. So far it seems to work.
  735.  
  736. ------------------------------------------------------------------------
  737. Disassembled R_DrawColumn() and R_DrawSpan() with OMD, created
  738. amiga_draw.s and hand-optimised a bit.
  739.  
  740. ------------------------------------------------------------------------
  741. Program still often crashes on exit   :(
  742.  
  743. ------------------------------------------------------------------------
  744.